package com.bonc.cq.cloud.fallback;
import com.alibaba.fastjson.JSONObject;
import com.bonc.cq.cloud.feign.InstanceFeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author fengyong
 * @version V1.0
 * @Title:
 * @Description:
 * @date 2019-08-03 14:55
 */
@Component
public class InstanceFeignHystrix implements InstanceFeignClient {

    @Override
    public JSONObject getInstance(@PathVariable("serviceId") String serviceId){
        JSONObject resJson = new JSONObject();
        resJson.put("serviceId",serviceId);
        resJson.put("detail","host error");
        return resJson;
    }
}
